<template>
  这是钉钉登录页面
</template>

<script setup>
  import { ref, onMounted } from "vue"
  import {useRoute, useRouter } from "vue-router";
  import http from "../http"

  const route = useRoute()
  const router = useRouter()

  onMounted(() => {
    http.get("user/dingtalklogin/")
    .then(res=>{
      console.log(res)
      router.push(res.data.url)
    })
    .catch(error=>{
      console.log(error)
    })
  })
</script>
